package com.chonry.web2.config;

import com.chonry.web2.utils.MyMapper;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import tk.mybatis.spring.mapper.MapperScannerConfigurer;

@Configuration
public class MyBatisScannerConfig {

    @Bean
    public MapperScannerConfigurer getMapperScannerConfigurer(){
        MapperScannerConfigurer configurer = new MapperScannerConfigurer();
        configurer.setMarkerInterface(MyMapper.class);
        configurer.setBasePackage("com.chonry.web2.mappers.sharding,com.chonry.web2.mappers.nosharding");
        return configurer;
    }
}
